import request, { downloadPost } from '@/utils/request2'
import { materialApiUrl } from '../../config'


export default {
  findListByMain(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/findListByMain', method: 'post', params, data
    })
  },
  findListCount(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/findListCount', method: 'post', params, data
    })
  },
  print(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/print/' + params.id, method: 'get', params, data
    })
  },
  downMaterialAnalysisExcel(data, fileName) {
    return downloadPost(materialApiUrl + '/scene-cost-analysis/downMaterialAnalysisExcel', data, null, fileName)
  },
  deleteByBenefitAnalysis(data, params) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/deleteByBenefitAnalysis', method: 'post', params, data
    })
  },
  findListByMainId(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/findListByMainId/' + params.id,
      method: 'get', params, data
    })
  },
  findListByDetails(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/findListByDetails', method: 'post', params, data
    })
  },
  editByMain(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/editByMain', method: 'post', params, data
    })
  },
  editByByDetail(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/editByByDetail', method: 'post', params, data
    })
  },
  deleteByDetails(data, params) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/deleteByByDetailList', method: 'post', params, data
    })
  },
  deleteByMain(data, params) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/deleteByMain', method: 'post', params, data
    })
  },
  createByMain(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/createByMain', method: 'post', params, data
    })
  },
  createByDetails(params, data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/createByDetail', method: 'post', params, data
    })
  },
  createByDetailsList(params,data) {
    return request({
      url: materialApiUrl + '/scene-cost-analysis/createByDetailsList', method: 'post', data
    })
  },
  findFileList(params, data) {
    return materialApiUrl + '/scene-cost-analysis/findFileList'
  },
  deleteFile(params, data) {
    return materialApiUrl + '/scene-cost-analysis/deleteFile'
  },
  addFile(params, data) {
    return materialApiUrl + '/scene-cost-analysis/addFile'
  },
  downExcel(data) {
    return downloadPost(materialApiUrl + '/scene-cost-analysis/downMaterialAnalysisExcel', data)
  }

}
